//
//  SARegistSecondStepViewController.m
//  SunOn
//
//  Created by mc on 2017/5/2.
//  Copyright © 2017年 NeoZhang. All rights reserved.
//  注册界面 第二步骤:获取验证码 填写密码

#import "SARegistSecondStepViewController.h"
#import "SABaseViewController.h"

@interface SARegistSecondStepViewController ()
//logo
@property (weak, nonatomic) IBOutlet UIImageView *userImage;
//用户手机号
@property (weak, nonatomic) IBOutlet UITextField *userPhone;
//输入验证码
@property (weak, nonatomic) IBOutlet UITextField *verificationCode;
//发送验证码
@property (weak, nonatomic) IBOutlet UIButton *sendCode;
//密码
@property (weak, nonatomic) IBOutlet UITextField *passWord;
//重复密码
@property (weak, nonatomic) IBOutlet UITextField *repeatPassword;
//下一步
@property (weak, nonatomic) IBOutlet UIButton *nextStep;
//返回
@property (weak, nonatomic) IBOutlet UIImageView *backImage;


/***layout****/

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *userImageHeadLayout;//107 iphone 7



@end

@implementation SARegistSecondStepViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self configureView];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - view action
//下一步
- (IBAction)nextStepAction:(UIButton *)sender {
    UIApplication *app = [UIApplication sharedApplication];
    SABaseViewController *baseVC = [[SABaseViewController alloc] init];
    app.delegate.window.rootViewController = baseVC;
}
//发送验证码
- (IBAction)sendCodeAction:(UIButton *)sender {
    
}

#pragma mark - view layout

- (void)configureView {
    SAViewRadius(self.nextStep, 17.5);
    SAViewBorderRadius(self.sendCode, 15, 1.0, [UIColor colorWithRed:99/255.0 green:171/255.0 blue:241/255.0 alpha:1.0]);
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(backAction)];
    self.backImage.userInteractionEnabled = YES;
    [self.backImage addGestureRecognizer:tap];
}
#pragma mark - custom method
- (void)backAction {
    DLog(@"返回");
    [self dismissViewControllerAnimated:YES completion:nil];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
